crypto: add signDigest/verifyDigest and Ed25519ctx support#62345
crypto: add signDigest/verifyDigest and Ed25519ctx support#62345panva wants to merge 8 commits intonodejs:mainfrom
Conversation
|
Review requested:
|
|
The
notable-change
Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62345 +/- ##
==========================================
+ Coverage 89.68% 89.70% +0.01%
==========================================
Files 676 676
Lines 206689 206807 +118
Branches 39579 39611 +32
==========================================
+ Hits 185370 185507 +137
- Misses 13450 13457 +7
+ Partials 7869 7843 -26
🚀 New features to boost your workflow:
|
|
Not entirely certain how this works, will test |
regular
prehashed
Even though the digest is already computed, OpenSSL needs to know which digest was used:
Other key type dependant cases:
|
| break; | ||
| #else | ||
| if (can_throw) | ||
| crypto::CheckThrow(env, SignBase::Error::PrehashUnsupported); |
notable-changePRs with changes that should be highlighted in changelogs.
👇
Adds
crypto.signDigest()andcrypto.verifyDigest(), one-shot functions that sign/verify a pre-computed hash digest directly, without hashing internally.Supports RSA (PKCS#1 v1.5, PSS), ECDSA, DSA, Ed25519, Ed448, and ML-DSA (external mu).
Also adds Ed25519 context string support to
crypto.sign(),crypto.verify()as well as the new methods.Resolves: #60263
Pre-hash variants of Ed25519 and Ed448 as well Ed25519 context is defined in RFC8032